package net.shao.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.RelativeLayout;

import com.socks.library.KLog;

import net.shao.R;

/**
 * Created by shao on 2016/8/14.
 */
public class PullScrollView extends RelativeLayout {

    private int downY;//记录按下的Y轴
    private int moveY;//记录动态的处于触摸状态的Y轴
    private int mTouchSlop;//最小滑动距离


    public PullScrollView(Context context) {
        super(context);
        initView(context);
    }

    public PullScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    private void initView(Context context) {
        //初始化一个最小滑动距离
        mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
        View view = LayoutInflater.from(context).inflate(R.layout.view_pull_scroll, this, false);


    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        final int action = event.getAction();

        switch (action) {
            case MotionEvent.ACTION_DOWN:

                break;
            case MotionEvent.ACTION_MOVE:

                break;
            case MotionEvent.ACTION_UP:

                break;
        }

        return true;
    }
}
